<template>
  <h2>APP父级组件</h2>
  <button @click="isShow=!isShow">切换显示</button>
  <hr>
  <child v-if="isShow"/>
</template>
<script lang="ts">
import Child from '@/components/Child'
import { defineComponent, ref } from 'vue'
export default defineComponent({
  name: 'App',
  components: {
    Child
  },
  setup () {
    const isShow = ref(true)
    return {
      isShow
    }
  }
})
</script>
